<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"

      > 
    <h:head>
        <title>index</title>
        
        <script type="text/javascript">  
    function start() {  
        this.progressInterval = setInterval(function(){  
            pbClient.setValue(pbClient.getValue() + 10);  
        }, 2000);  
    }  
  
    function cancel() {  
        clearInterval(this.progressInterval);  
        pbClient.setValue(0);  
    }  
</script> 
    </h:head>
    <h:body>
        <h:form>
            <p:calendar/>
            <br></br>
            <p:commandButton value="Start" type="button" onclick="start();startButton1.disable()" widgetVar="startButton1"/>  
            <p:commandButton value="Cancel" type="button" onclick="cancel();startButton1.enable()" />  
            <br></br>
            <p:progressBar widgetVar="pbClient" style="width:300px" />  
        </h:form>
    </h:body>
</html>

